import React from 'react';
import {
  NavLink
} from 'react-router-dom';
import './NavBar.scss';
class NavBar extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      NavList: [{
        url: '/abc/home',
        name: '借款',
        icon:'icon-tab-btn-jiekuan-hpn'
      }, {
        url: '/abc/about',
        name: '还款',
        icon:'icon-tab-btn-huankuan-hp'
      },{
        url: '/abc/mine',
        name: '我的',
        icon:'icon-tab-btn-me-npng'
      }]
    }
  }
  render() {
    return (
      <ul className="nav-bar">
        {this.state.NavList.map(function (item, index) {
          return (
            <li key={"li_"+index}><NavLink to={item.url} activeClassName="active" >
              <div><i className={"iconfont "+item.icon}></i></div>
              {item.name}
            </NavLink></li>
          )
        })}
        {/* <li className="source">来源于: {this.props.title}</li> */}
      </ul>
    )
  }
}

export default NavBar;
